package com.mtcarpenter.mall.client.fallback;

import com.mtcarpenter.mall.client.CmsPrefrenceAreaProductRelationClient;
import com.mtcarpenter.mall.common.CmsPrefrenceAreaProductRelationInput;
import com.mtcarpenter.mall.common.api.CommonResult;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class CmsPrefrenceAreaFallBack implements CmsPrefrenceAreaProductRelationClient {
    @Override
    public CommonResult relateAndInsertList(List<CmsPrefrenceAreaProductRelationInput> productRelationInput, Long productId) {
        return null;
    }

    @Override
    public CommonResult relateAndUpdateList(List<CmsPrefrenceAreaProductRelationInput> productRelationInputs, Long productId) {
        return null;
    }

    @Override
    public CommonResult<List<CmsPrefrenceAreaProductRelationInput>> relationByProductId(Long productId) {

        String message = "服务降级处理 CmsPrefrenceAreaFallBack relationByProductId : productId is : " + productId;
        System.out.println(message);
        return CommonResult.failed(message);
    }
}
